/PROG  TEST0062DUO
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "TEST";
PROG_SIZE	= 2910;
CREATE		= DATE 19-09-12  TIME 09:10:42;
MODIFIED	= DATE 19-09-12  TIME 13:23:24;
FILE_NAME	= PNS0062;
VERSION		= 0;
LINE_COUNT	= 106;
MEMORY_SIZE	= 3406;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0062 ;
   7:  !  PART:53379724 ;
   8:  !XEB_0728*********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.2    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:   ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:   ;
  34:  TIMER[2]=STOP ;
  35:  R[1]=R[1]+1    ;
  36:  R[2]=TIMER[2]    ;
  37:  R[3]=60/R[2]    ;
  38:  TIMER[2]=RESET ;
  39:  TIMER[2]=START ;
  40:   ;
  41:  !PROCEED TO PICK ;
  42:  LBL[20] ;
  43:  IF DI[1]=ON AND DI[2]=ON AND DI[4]=ON,JMP LBL[25] ;
  44:  IF DI[29]=ON,JMP LBL[90] ;
  45:  JMP LBL[20] ;
  46:   ;
  47:  LBL[25] ;
  48:J P[6] 100% CNT100 ACC100    ;
  49:J P[3:PICK APPROACH] 100% CNT50 ACC100    ;
  50:  DO[1]=OFF ;
  51:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  52:  PAYLOAD[2] ;
  53:   ;
  54:J P[5:PICK DEPART] 100% CNT30 ACC100    ;
  55:   ;
  56:   ;
  57:  LBL[30:GOTO DROP POUNCE] ;
  58:   ;
  59:  LBL[40:AT DROP POUNCE] ;
  60:  IF DI[2]=ON AND DI[4]=ON,JMP LBL[80] ;
  61:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  62:  IF DI[18]=ON,JMP LBL[60] ;
  63:  JMP LBL[40] ;
  64:   ;
  65:  LBL[50:MOVE DROP SNEAK] ;
  66:  //OVERRIDE=R[5] ;
  67:  LBL[51:DROP OR C-P-S] ;
  68:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  69:  IF DI[18]=ON,JMP LBL[40] ;
  70:  JMP LBL[51] ;
  71:  JMP LBL[50] ;
  72:   ;
  73:  LBL[60:MOVE CLS-PRS-ACC] ;
  74:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  75:  PAUSE ;
  76:  JMP LBL[30] ;
  77:   ;
  78:  LBL[80:DROP ENABLED] ;
  79:  !PROCEED TO DROP ;
  80:  TIMER[4]=RESET ;
  81:  TIMER[4]=START ;
  82:   ;
  83:  DO[4]=OFF ;
  84:J P[10:DROP APPROACH] 100% CNT60 ACC100    ;
  85:J P[11:DROP] 100% CNT10 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
  86:  DO[6]=PULSE,1.0sec ;
  87:  PAYLOAD[1] ;
  88:  CALL CHK_DROP    ;
  89:  //DO[7]=PULSE,1.0sec ;
  90:J P[12:DROP DEPART] 100% CNT20 ACC100    ;
  91:  WAIT    .50(sec) ;
  92:  TIMER[4]=STOP ;
  93:L P[13:DROP CLEAR] 3000mm/sec CNT100 ACC100    ;
  94:  !GOTO PICK POUNCE ;
  95:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
  96:  WAIT   3.20(sec) ;
  97:  IF DI[29]=ON,JMP LBL[90] ;
  98:  JMP LBL[10] ;
  99:   ;
 100:  LBL[90:END OF CYCLE] ;
 101:  TIMER[1]=STOP ;
 102:  R[4]=TIMER[1]    ;
 103:J P[1:MIDDLE] 50% CNT100    ;
 104:  MOVE TO HOME    ;
 105:   ;
 106:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2548.814  mm,	Y =  -314.870  mm,	Z =  -890.136  mm,
	W =  -179.764 deg,	P =      .286 deg,	R =   -87.823 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2502.492  mm,	Y = -1473.307  mm,	Z =  -912.167  mm,
	W =  -179.733 deg,	P =      .290 deg,	R =   -87.659 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2061.848  mm,	Y = -3073.346  mm,	Z =  -972.526  mm,
	W =  -179.553 deg,	P =     -.051 deg,	R =   -89.592 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2061.848  mm,	Y = -3073.346  mm,	Z = -1041.486  mm,
	W =  -179.553 deg,	P =     -.051 deg,	R =   -89.592 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2061.848  mm,	Y = -3073.346  mm,	Z =  -905.326  mm,
	W =  -179.553 deg,	P =     -.051 deg,	R =   -89.592 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2482.514  mm,	Y = -2556.986  mm,	Z =  -938.761  mm,
	W =  -179.606 deg,	P =      .139 deg,	R =   -88.639 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2793.323  mm,	Y = -3073.202  mm,	Z =  -905.561  mm,
	W =  -179.556 deg,	P =     -.047 deg,	R =   -89.589 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2794.744  mm,	Y = -3074.278  mm,	Z = -1101.480  mm,
	W =  -179.563 deg,	P =     -.042 deg,	R =   -89.592 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2793.324  mm,	Y = -3073.201  mm,	Z =  -993.561  mm,
	W =  -179.556 deg,	P =     -.047 deg,	R =   -89.589 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2502.492  mm,	Y = -1473.307  mm,	Z =  -912.167  mm,
	W =  -179.733 deg,	P =      .290 deg,	R =   -87.659 deg
};
/END
